package com.qiantu.api.entity;

import com.qiantu.api.BuildConfig;
import com.qiantu.api.utils.ThemeUtil;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public class LinkageNewBean {
    private String linkageSerialNo;
    private int bid;
    private String name;
    private int decideType;
    private String houseSerialNo;
    private String roomSerialNo;
    private int linkType;
    private List<LinkageTimeCondition> conditionTimeList;
    private List<LinkageWeatherCondition> conditionEnvWeatherList;
    private List<LinkageDeviceCondition> conditionEnvTemperatureList;
    private List<LinkageDeviceCondition> conditionEnvHumidityList;
    private List<LinkageDeviceCondition> conditionEnvAirList;
    private List<LinkageSunCondition> conditionEnvSunList;
    private List<LinkageDeviceCondition> conditionDeviceStateList;
    private List<LinkageBean.LinkageTask> linkageTasks;
    private List<LinkageBaseCondition> conditions;

    public static class LinkageBaseCondition implements Serializable {
        public long conditionBid;
        public int conditionTypeId;
        public int actionTypeId;
        public int operatorTypeId;
        public int groupNum;
        public String icon;
        public int sort;
        public int lineType;
        public long getConditionBid() {
            return conditionBid;
        }

        public void setConditionBid(long conditionBid) {
            this.conditionBid = conditionBid;
        }

        public int getConditionTypeId() {
            return conditionTypeId;
        }

        public void setConditionTypeId(int conditionTypeId) {
            this.conditionTypeId = conditionTypeId;
        }

        public int getActionTypeId() {
            return actionTypeId;
        }

        public void setActionTypeId(int actionTypeId) {
            this.actionTypeId = actionTypeId;
        }

        public int getOperatorTypeId() {
            return operatorTypeId;
        }

        public void setOperatorTypeId(int operatorTypeId) {
            this.operatorTypeId = operatorTypeId;
        }

        public int getGroupNum() {
            return groupNum;
        }

        public void setGroupNum(int groupNum) {
            this.groupNum = groupNum;
        }

        public String getIcon() {
            return BuildConfig.APP_RESOURCE_BASE + ThemeUtil.getIconThemeSuffix() + icon + "_linkage.png";
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public int getSort() {
            return sort;
        }

        public void setSort(int sort) {
            this.sort = sort;
        }

        public int getLineType() {
            return lineType;
        }

        public void setLineType(int lineType) {
            this.lineType = lineType;
        }
    }

    public static class LinkageTimeCondition extends LinkageBaseCondition{
        private int repeatTypeId;
        private int fromHour;
        private int fromMinute;
        private int toHour;
        private int toMinute;
        private String repeatFromTime;
        private String repeatToTime;
        private List<Integer> repeatWeekDays;

        public int getRepeatTypeId() {
            return repeatTypeId;
        }

        public void setRepeatTypeId(int repeatTypeId) {
            this.repeatTypeId = repeatTypeId;
        }

        public int getFromHour() {
            return fromHour;
        }

        public void setFromHour(int fromHour) {
            this.fromHour = fromHour;
        }

        public int getFromMinute() {
            return fromMinute;
        }

        public void setFromMinute(int fromMinute) {
            this.fromMinute = fromMinute;
        }

        public int getToHour() {
            return toHour;
        }

        public void setToHour(int toHour) {
            this.toHour = toHour;
        }

        public int getToMinute() {
            return toMinute;
        }

        public void setToMinute(int toMinute) {
            this.toMinute = toMinute;
        }

        public String getRepeatFromTime() {
            return repeatFromTime;
        }

        public void setRepeatFromTime(String repeatFromTime) {
            this.repeatFromTime = repeatFromTime;
        }

        public String getRepeatToTime() {
            return repeatToTime;
        }

        public void setRepeatToTime(String repeatToTime) {
            this.repeatToTime = repeatToTime;
        }

        public List<Integer> getRepeatWeekDays() {
            return repeatWeekDays;
        }

        public void setRepeatWeekDays(List<Integer> repeatWeekDays) {
            this.repeatWeekDays = repeatWeekDays;
        }
    }

    public static class LinkageWeatherCondition extends LinkageBaseCondition{
        private List<WeatherValueBean> weatherKeyValue;
        private int areaTypeId;
        private String areaName;
        private String areaCode;
        private double longitude;
        private double latitude;

        public List<WeatherValueBean> getWeatherKeyValue() {
            return weatherKeyValue;
        }

        public void setWeatherKeyValue(List<WeatherValueBean> weatherKeyValue) {
            this.weatherKeyValue = weatherKeyValue;
        }

        public int getAreaTypeId() {
            return areaTypeId;
        }

        public void setAreaTypeId(int areaTypeId) {
            this.areaTypeId = areaTypeId;
        }

        public String getAreaName() {
            return areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public String getAreaCode() {
            return areaCode;
        }

        public void setAreaCode(String areaCode) {
            this.areaCode = areaCode;
        }

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }
    }

    public static class LinkageDeviceCondition extends LinkageBaseCondition{
        private String deviceSerialNo;
        private String stateName;
        private double beginValue;
        private double endValue;
        private int areaTypeId;
        private String areaName;
        private String areaCode;
        private double longitude;
        private double latitude;
        private int compareTypeId;
        private String description;

        public String getDeviceSerialNo() {
            return deviceSerialNo;
        }

        public void setDeviceSerialNo(String deviceSerialNo) {
            this.deviceSerialNo = deviceSerialNo;
        }

        public String getStateName() {
            return stateName;
        }

        public void setStateName(String stateName) {
            this.stateName = stateName;
        }

        public double getBeginValue() {
            return beginValue;
        }

        public void setBeginValue(double beginValue) {
            this.beginValue = beginValue;
        }

        public double getEndValue() {
            return endValue;
        }

        public void setEndValue(double endValue) {
            this.endValue = endValue;
        }

        public int getAreaTypeId() {
            return areaTypeId;
        }

        public void setAreaTypeId(int areaTypeId) {
            this.areaTypeId = areaTypeId;
        }

        public String getAreaName() {
            return areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public String getAreaCode() {
            return areaCode;
        }

        public void setAreaCode(String areaCode) {
            this.areaCode = areaCode;
        }

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }

        public int getCompareTypeId() {
            return compareTypeId;
        }

        public void setCompareTypeId(int compareTypeId) {
            this.compareTypeId = compareTypeId;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }

    public static class LinkageSunCondition extends LinkageBaseCondition{
        private int repeatTypeId;
        private int directionFromTypeId;
        private int towardFromTypeId;
        private int towardFromMinute;
        private int directionToTypeId;
        private int towardToTypeId;
        private int towardToMinute;
        private String repeatFromTime;
        private String repeatToTime;
        private List<Integer> repeatWeekDays;
        private String areaName;
        private String areaCode;
        private double longitude;
        private double latitude;

        public int getRepeatTypeId() {
            return repeatTypeId;
        }

        public void setRepeatTypeId(int repeatTypeId) {
            this.repeatTypeId = repeatTypeId;
        }

        public int getDirectionFromTypeId() {
            return directionFromTypeId;
        }

        public void setDirectionFromTypeId(int directionFromTypeId) {
            this.directionFromTypeId = directionFromTypeId;
        }

        public int getTowardFromTypeId() {
            return towardFromTypeId;
        }

        public void setTowardFromTypeId(int towardFromTypeId) {
            this.towardFromTypeId = towardFromTypeId;
        }

        public int getTowardFromMinute() {
            return towardFromMinute;
        }

        public void setTowardFromMinute(int towardFromMinute) {
            this.towardFromMinute = towardFromMinute;
        }

        public int getDirectionToTypeId() {
            return directionToTypeId;
        }

        public void setDirectionToTypeId(int directionToTypeId) {
            this.directionToTypeId = directionToTypeId;
        }

        public int getTowardToTypeId() {
            return towardToTypeId;
        }

        public void setTowardToTypeId(int towardToTypeId) {
            this.towardToTypeId = towardToTypeId;
        }

        public int getTowardToMinute() {
            return towardToMinute;
        }

        public void setTowardToMinute(int towardToMinute) {
            this.towardToMinute = towardToMinute;
        }

        public String getRepeatFromTime() {
            return repeatFromTime;
        }

        public void setRepeatFromTime(String repeatFromTime) {
            this.repeatFromTime = repeatFromTime;
        }

        public String getRepeatToTime() {
            return repeatToTime;
        }

        public void setRepeatToTime(String repeatToTime) {
            this.repeatToTime = repeatToTime;
        }

        public List<Integer> getRepeatWeekDays() {
            return repeatWeekDays;
        }

        public void setRepeatWeekDays(List<Integer> repeatWeekDays) {
            this.repeatWeekDays = repeatWeekDays;
        }

        public String getAreaName() {
            return areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public String getAreaCode() {
            return areaCode;
        }

        public void setAreaCode(String areaCode) {
            this.areaCode = areaCode;
        }

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }
    }

    public String getLinkageSerialNo() {
        return linkageSerialNo;
    }

    public void setLinkageSerialNo(String linkageSerialNo) {
        this.linkageSerialNo = linkageSerialNo;
    }

    public int getBid() {
        return bid;
    }

    public void setBid(int bid) {
        this.bid = bid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getDecideType() {
        return decideType;
    }

    public void setDecideType(int decideType) {
        this.decideType = decideType;
    }

    public String getHouseSerialNo() {
        return houseSerialNo;
    }

    public void setHouseSerialNo(String houseSerialNo) {
        this.houseSerialNo = houseSerialNo;
    }

    public String getRoomSerialNo() {
        return roomSerialNo;
    }

    public void setRoomSerialNo(String roomSerialNo) {
        this.roomSerialNo = roomSerialNo;
    }

    public int getLinkType() {
        return linkType;
    }

    public void setLinkType(int linkType) {
        this.linkType = linkType;
    }

    public List<LinkageTimeCondition> getConditionTimeList() {
        return conditionTimeList;
    }

    public void setConditionTimeList(List<LinkageTimeCondition> conditionTimeList) {
        this.conditionTimeList = conditionTimeList;
    }

    public List<LinkageWeatherCondition> getConditionEnvWeatherList() {
        return conditionEnvWeatherList;
    }

    public void setConditionEnvWeatherList(List<LinkageWeatherCondition> conditionEnvWeatherList) {
        this.conditionEnvWeatherList = conditionEnvWeatherList;
    }

    public List<LinkageDeviceCondition> getConditionEnvTemperatureList() {
        return conditionEnvTemperatureList;
    }

    public void setConditionEnvTemperatureList(List<LinkageDeviceCondition> conditionEnvTemperatureList) {
        this.conditionEnvTemperatureList = conditionEnvTemperatureList;
    }

    public List<LinkageDeviceCondition> getConditionEnvHumidityList() {
        return conditionEnvHumidityList;
    }

    public void setConditionEnvHumidityList(List<LinkageDeviceCondition> conditionEnvHumidityList) {
        this.conditionEnvHumidityList = conditionEnvHumidityList;
    }

    public List<LinkageDeviceCondition> getConditionEnvAirList() {
        return conditionEnvAirList;
    }

    public void setConditionEnvAirList(List<LinkageDeviceCondition> conditionEnvAirList) {
        this.conditionEnvAirList = conditionEnvAirList;
    }

    public List<LinkageSunCondition> getConditionEnvSunList() {
        return conditionEnvSunList;
    }

    public void setConditionEnvSunList(List<LinkageSunCondition> conditionEnvSunList) {
        this.conditionEnvSunList = conditionEnvSunList;
    }

    public List<LinkageDeviceCondition> getConditionDeviceStateList() {
        return conditionDeviceStateList;
    }

    public void setConditionDeviceStateList(List<LinkageDeviceCondition> conditionDeviceStateList) {
        this.conditionDeviceStateList = conditionDeviceStateList;
    }

    public List<LinkageBean.LinkageTask> getLinkageTasks() {
        return linkageTasks;
    }

    public void setLinkageTasks(List<LinkageBean.LinkageTask> linkageTasks) {
        this.linkageTasks = linkageTasks;
    }

    public List<LinkageBaseCondition> getConditions() {
        return conditions;
    }

    public void setConditions(List<LinkageBaseCondition> conditions) {
        this.conditions = conditions;
    }
}
